Previous Book Contents Book Index Next

Inside Macintosh: QuickDraw GX Objects /
Chapter 6 - Transform Objects / Transform Objects Reference
Functions / Transforming Shapes by Modifying Transform Mappings


GXSkewTransform

You can use the GXSkewTransform function to alter the mapping property of a transform object so that it skews its associated shape about a specified origin by specified horizontal and vertical factors.

void GXSkewTransform(gxTransform target, Fixed xSkew, 
                     Fixed ySkew, Fixed xOffset, Fixed yOffset);
target
A reference to the transform object whose mapping property you want to alter.
hSkew
The amount to skew in the horizontal direction.
vSkew
The amount to skew in the vertical direction.
xOffset
The horizontal coordinate of the origin to skew about.
yOffset
The vertical coordinate of the origin to skew about.
DESCRIPTION
The GXSkewTransform function calculates a new mapping matrix for the transform object referenced by the target parameter. When applied to a shape, the new mapping matrix performs the same mapping transformations on the shape as the original matrix, but the new matrix also skews the shape in the horizontal direction by the factor indicated by the hSkew parameter, and in the vertical direction by the factor indicated by the vSkew parameter. The new matrix skews the shape about the origin specified by the xOffset and yOffset parameters. (The origin is the point whose coordinates do not change as a result of the scaling operation.)

The skew factors are expressed as a proportional amount of shift in one direction with distance in the perpendicular direction. A value of 0 for the hSkew or vSkew parameter indicates no skewing in the corresponding direction.

The coordinates of the origin are specified in local space.

ERRORS, WARNINGS, AND NOTICES
Errors 
out_of_memory 
transform_is_nil 
Warnings 
skew_transform_out_of_range 
Notices (debugging version) 
mapping_unaffected 
SEE ALSO
For an example of the use of this function, see Listing 6-3 on page 6-25.

For information about mapping matrices in general, see the mathematics chapter of Inside Macintosh: QuickDraw GX Environment and Utilities.

To skew a shape by altering its geometry, use the GXSkewShape function, described on page 6-71.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
7 JUL 1996